<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>预定会议室</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<script type="text/javascript">
	function yu(){
		var boardroomId=document.getElementsByName("boardroomId").val();
		var intendedName=document.getElementsByName("intendedName").val();
		var startTime=document.getElementsByName("startTime").val();
		var duration=document.getElementsByName("duration").val();
		var enteringName=document.getElementsByName("enteringName").val();
		var reson=document.getElementsByName("reson").val();
		if(boardroomId==null || intendedName==null||startTime==null||duration==null||enteringName==null||reson==null||boardroomId=="" || intendedName==""||startTime==""||duration==""||enteringName==""||reson==""){
			alert("预订信息不完整");
		}
	}
</script>
</head>

<body>
	<div>
		<h1>添加预订信息</h1>
		<form action="ScheduleServlet?opr=add" method="post">
			选择会议室：<select name="boardroomId">
					    <option value="0"></option>
					    <option value="1">1号会议室</option>
					    <option value="2">2号会议室</option>
					    <option value="3">3号会议室</option>
				    </select><br>
			预订人姓名：<input type="text" name="intendedName"><br>
			预定开始时间：<input type="text" name="startTime"><br>
			预订时长：<input type="text" name="duration">小时<br>
			录入人姓名：<input type="text" name="enteringName"><br>
			预定原因：<input type="text" name="reson"><br>
			<input type="submit" onclick="yu()" value="保存">
			<input type="reset" value="清空">
			<input type="button" value="关闭">
		</form>
	</div>
</body>
</html>
